﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using nwrole.lib;

namespace nwrole.SupervisorConsole {
    class Program {
        
        private static int SupervisorPort = 8094;

        static void Main(string[] args) {
            
            SupervisorHost supervisorHost = new SupervisorHost(new nwrole.lib.StandardServiceProvider(), "nwrole.lib.StandardPluginProvider", SupervisorPort);

            Trace.Listeners.Add(new ConsoleTraceListener());

            Console.WriteLine("Supervisor starting");

            if (!supervisorHost.Start()) {
                Console.WriteLine("Supervisor error starting");
                return;
            }

            Console.WriteLine("Supervisor started");

            Console.WriteLine("Press enter to exit");
            Console.ReadLine();

            supervisorHost.Stop();

            Console.WriteLine("Supervisor stopped");
        }
    }
}
